import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
 
import Home from '../views/Home.vue'
import Course from '../views/Course.vue'
import My from '../views/My.vue'
import Found from '../views/Found.vue'
import Online from '../views/Online.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      redirect: '/home',
      children: [
        {
          // 首页
          path: '/home',
          name: 'home',
          component: Home,
          // redirect: '/look',
        },
        {
          // 课程
          path: '/course',
          name: 'course',
          component: Course,
        },
        {
          // 我的
          path: '/my',
          name: 'my',
          component: My
        },
        {
          // 发布
          path: '/found',
          name: 'found',
          component: Found
        },
        {
          // 在线上课
          path: '/online',
          name: 'online',
          component: Online
        },
      ]
    },

  ]
})

export default router
